package Launch;
import book.BookList;
import bookCircle.BookCircleView;
import loadFileDate.loadData;
import login.LoginView;
import person.PersonView;
import rankList.RankList;
import user.User;
import veiw.SelectView;

public class start {
    public static void main(String[] args) {
        //加载文件确保文件存在
        new loadData();
        //登录
        LoginView login = new LoginView();
        User user = login.viewLogin();
        //准备数据
        BookList bookList = new BookList();
        while(true){
            SelectView selectView = new SelectView();
            int input = selectView.view(user);
            switch (input){
                case 1: //进入图书馆
                    user.menu(user,bookList);
                    break;
                case 2: //进入个人中心
                    new PersonView(user);
                    break;
                case 3: //进入书友圈
                    new BookCircleView();
                    break;
                case 4://进入排行榜
                    new RankList();
                    break;
                case 0://退出
                    System.out.println("感谢使用!!!");
                    System.exit(0);
                default:
                    System.out.println("没有该选项，请重新选择");
                    break;
            }
        }
    }
}
